//
//  FMUserUnLoginView.m
//  PsychologyFM
//
//  Created by lanou on 16/1/21.
//  Copyright © 2016年 ZhangLuDu. All rights reserved.
//

#import "FMUserUnLoginView.h"


@implementation FMUserUnLoginView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
        
        
                _bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(frame.origin.x, 0, kScreenWidth, kScreenHeight / 5)];
                _bgImage.image = [UIImage imageNamed:@"bg1"];
                [self addSubview:_bgImage];
        
                _iconImage = [[UIImageView alloc] initWithFrame:CGRectMake(frame.origin.x + kScreenWidth / 2 - 25, kScreenHeight / 5 - 25, 50, 50)];
                _iconImage.image = [UIImage imageNamed:@"fm50"];
                _iconImage.layer.masksToBounds = YES;
                _iconImage.layer.cornerRadius = 25;
                [self addSubview:_iconImage];
        
                _loginButton = [UIButton buttonWithType:(UIButtonTypeRoundedRect)];
                _loginButton.frame = CGRectMake(frame.origin.x + 25, _iconImage.frame.origin.y + _iconImage.frame.size.width + 15, kScreenWidth - 50, 30);
                _loginButton.layer.cornerRadius = 10;
                _loginButton.backgroundColor = [UIColor orangeColor];
                [_loginButton setTitle:@"登 陆" forState:(UIControlStateNormal)];
                [_loginButton setBackgroundImage:[UIImage imageNamed:@""] forState:(UIControlStateNormal)];
                [self addSubview:_loginButton];
        
                _label = [[UILabel alloc] initWithFrame:CGRectMake(_loginButton.left + 50, _loginButton.bottom + 20, kScreenWidth - _loginButton.left + 20, 20)];
                _label.font = [UIFont systemFontOfSize:13];
                _label.text = @"登陆后可收藏,下载节目~ ~ ~ ~ ~ ~ ~";
                _label.textColor = FMGray;
                [self addSubview:_label];
 
        
    }
    return self;
}

@end
